From 02143f7644fc381c4ff6563b80440e66b9989ad5 Mon Sep 17 00:00:00 2001 From: "iap10@labyrinth.cl.cam.ac.uk" Date: Fri, 4 Feb 2005 00:08:28 +0000 Subject: [PATCH] bitkeeper revision 1.1159.241.3 (4202bcfcMuCoA62roOJu-r3AKctkBQ) strncpy will stop after a zero byte. Use memcpy instead. Signed-off-by: Chengyuan Li Signed-off-by: ian.pratt@cl.cam.ac.uk --- xen/arch/x86/vmx_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/vmx_platform.c b/xen/arch/x86/vmx_platform.c index 9ee99cd227..e4875dc042 100644 --- a/xen/arch/x86/vmx_platform.c +++ b/xen/arch/x86/vmx_platform.c @@ -372,7 +372,7 @@ static int inst_copy_from_guest(char *buf, unsigned long guest_eip, int inst_len ma = (mfn << PAGE_SHIFT) | (guest_eip & (PAGE_SIZE - 1)); inst_start = (unsigned char *)map_domain_mem(ma); - strncpy(buf, inst_start, inst_len); + memcpy(buf, inst_start, inst_len); unmap_domain_mem(inst_start); } else { // Todo: In two page frames -- 2.30.2